#include "gm3d.h"

//返回一个cpoint的位置id字符串
string GM3D::point_id(vertex c){
	string vert_id, mid_id;
	stringstream sstemp;

	sstemp.str(""); sstemp.clear(); sstemp<<setprecision(GCTL_PRECISION)<<c.x;
	sstemp>>vert_id;

	sstemp.str(""); sstemp.clear(); sstemp<<setprecision(GCTL_PRECISION)<<c.y;
	sstemp>>mid_id;
	vert_id = vert_id + " " + mid_id;

	sstemp.str(""); sstemp.clear(); sstemp<<setprecision(GCTL_PRECISION)<<c.z;
	sstemp>>mid_id;
	vert_id = vert_id + " " + mid_id;

	return vert_id;
}